feat(ops): SSOT registry for everything that reaches the operator's Telegram - #445
Merged
Conversation
…elegram George: 'telegram should still update me on things. and we should have ssot for things telegram does/updates me on. i do like when it tells me when there is feedback sent through the feedback form.' docs/telegram-notifications.md is now that SSOT: every notification class — requested updates (visitor feedback, run outcomes, Loki briefings), incidents (with the fix-agent dispatch), platform self-checks, and off-repo senders (Loki cron, orangecat uptime) — one row each: what arrives, when, from where. Enforced, not aspirational: scripts/ci/check-telegram-registry.sh (wired into npm run verify) finds every sender surface in the repo — direct api.telegram.org calls, importers of telegram-send.ts, box scripts sourcing lib-alert.sh — and fails when a path is missing from the registry. Adding a notification without registering it turns CI red in the same PR. Mutation-proven: a planted unregistered sender fails the gate naming the file; removing it goes green (22 sender files registered). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018RmMktaYn8MuJdEqjp5gWU
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
George: telegram should still update me on things. and we should have ssot for things telegram does/updates me on. i do like when it tells me when there is feedback sent through the feedback form, for example.
The registry
docs/telegram-notifications.md— one row per notification class, grouped by why it exists:src/lib/feedback/notify-new.ts— verified live on main, fires onPOST /api/feedbackfor genuine visitor rows), agent run outcomes (notifyOnClose), and Loki's briefings (their schedule SSOT staysjobs.jsonon bitbaum — the registry points, never copies).Plus the rules for adding one: channel question first, route through the two blessed send paths (
lib-alert.sh,telegram-send.ts), register in the same PR, never test-send live.The enforcement
scripts/ci/check-telegram-registry.sh, wired intonpm run verify: finds every sender surface in the repo — directapi.telegram.orgcalls, importers oftelegram-send.ts, box scripts sourcinglib-alert.sh— and fails naming any path missing from the registry. The SSOT is binding, not aspirational.Mutation-proven: a planted unregistered sender file turned the gate red naming the file; removing it went green (22 sender files registered).
🤖 Generated with Claude Code
https://claude.ai/code/session_018RmMktaYn8MuJdEqjp5gWU